INCLUDE(FindPackageHandleStandardArgs)
INCLUDE(HandleLibraryTypes)

SET(Armadillo_IncludeSearchPaths
  /usr/include/
)

SET(Armadillo_LibrarySearchPaths
  /usr/lib/
)

FIND_PATH(ARMADILLO_INCLUDE_DIR armadillo
  PATHS ${Armadillo_IncludeSearchPaths}
)
FIND_LIBRARY(ARMADILLO_LIBRARY_OPTIMIZED
  NAMES armadillo
  PATHS ${Armadillo_LibrarySearchPaths}
)

# Handle the REQUIRED argument and set the <UPPERCASED_NAME>_FOUND variable
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Armadillo "Could NOT find Armadillo"
  ARMADILLO_LIBRARY_OPTIMIZED
  ARMADILLO_INCLUDE_DIR
)

# Collect optimized and debug libraries
HANDLE_LIBRARY_TYPES(ARMADILLO)

MARK_AS_ADVANCED(
  ARMADILLO_INCLUDE_DIR
  ARMADILLO_LIBRARY_OPTIMIZED
)
